#define  _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#define FALSE 0 
#define TRUE 1

typedef int Status;

typedef struct BiTNode{
	int val;
	struct BiTNode* lchild, * rchild;
}BiTNode , *BiTree;

Status SearchBST(BiTree root, int key, BiTree f, BiTree* p) {
	if (!root) {
		*p = f;
		return FALSE;
	}
	else if (key == root->val) {
		*p = root;
		return TRUE;
	}
	if (key < root->val) {
		return SearchBST(root->lchild, key, root, p);
	}
	if (key > root->val) {
		return SearchBST(root->rchild, key, root, p);
	}


}




